<div class="page-content">
    <!-- BEGIN PAGE HEADER-->
	<div class="row">
		<div class="col-md-12">
			<!-- BEGIN PAGE TITLE & BREADCRUMB-->
			<h3 class="page-title">
		          Setting
			</h3>
			<ul class="page-breadcrumb breadcrumb">
				<li>
					<i class="fa fa-home"></i>
					<a href="<?php echo $this->Admin->admin_url() ?>">
						Home
					</a>
					<i class="fa fa-angle-right"></i>
				</li>
				<li>
					<a href="javascript:void(0)">
						Setting
					</a>
				</li>
			</ul>
			<!-- END PAGE TITLE & BREADCRUMB-->
		</div>
	</div>
	<!-- END PAGE HEADER-->
	<!-- BEGIN PAGE CONTENT-->
    <div class="row">
        <div class="col-md-12">
        	<!-- BEGIN VALIDATION STATES-->
        	<div class="portlet box blue">
        		<div class="portlet-title">
        			<div class="caption">
        				<i class="fa fa-reorder"></i>Managed_table
        			</div>
        		</div>
        		<div class="portlet-body form">
                
        			<!-- BEGIN FORM-->
        			<!--form action="" id="form_category" class="form-horizontal" method="post"-->
                    <?php
                        echo $this->Form->create('Setting', array(
                                                            'url' => array('controller' => 'setting', 'action' => 'index'), 
                                                            'type' => 'post',
                                                            'id' => 'form_category',
                                                            'class' => 'form-horizontal'));
                    ?>
        				<div class="form-body">
                            <?php echo $this->Session->flash(); ?>
                            
                            <div class="form-group">
        						<label class="control-label col-md-3">Logo home page (162x140)</label>
        						<div class="col-md-4">
                                    <div class="btn-group btn-group-xs btn-group-solid">
                                        <?php
                                            $image = @$setting['image']['logo_website_home'];
                                            $image = $image == "" ? "images/no-image.jpg" : $image; 
                                        ?>
                                        <img id="logo_website_home" class="show_image_browse" src="<?php echo $this->webroot ?><?php echo $image ?>" />
                                        <input class="logo_website_home" type="hidden" name="image[logo_website_home]" value="<?php echo $this->webroot ?><?php echo $image ?>" />
                                        <div class="clear"></div>
                                        <button class="btn blue fileBrowse" data-target="logo_website_home" type="button">Browse File</button>
										<button class="btn red fileDelete" data-target="logo_website_home" type="button">Delete File</button>
                                    </div>
                                </div>
        					</div>
                            
                            <div class="form-group">
        						<label class="control-label col-md-3">Logo (160x95)</label>
        						<div class="col-md-4">
                                    <div class="btn-group btn-group-xs btn-group-solid">
                                        <?php
                                            $image = @$setting['image']['logo_website'];
                                            $image = $image == "" ? "images/no-image.jpg" : $image; 
                                        ?>
                                        <img id="logo_website" class="show_image_browse" src="<?php echo $this->webroot ?><?php echo $image ?>" />
                                        <input class="logo_website" type="hidden" name="image[logo_website]" value="<?php echo $this->webroot ?><?php echo $image ?>" />
                                        <div class="clear"></div>
                                        <button class="btn blue fileBrowse" data-target="logo_website" type="button">Browse File</button>
										<button class="btn red fileDelete" data-target="logo_website" type="button">Delete File</button>
                                    </div>
                                </div>
        					</div>
                            
                            
                            
                            <div class="form-group">
        						<label class="control-label col-md-3">Logo HSTH</label>
        						<div class="col-md-4">
                                    <div class="btn-group btn-group-xs btn-group-solid">
                                        <?php
                                            $image = @$setting['image']['logo_hsth'];
                                            $image = $image == "" ? "images/no-image.jpg" : $image; 
                                        ?>
                                        <img id="logo_hsth" class="show_image_browse" src="<?php echo $this->webroot ?><?php echo $image ?>" />
                                        <input class="logo_hsth" type="hidden" name="image[logo_hsth]" value="<?php echo $this->webroot ?><?php echo $image ?>" />
                                        <div class="clear"></div>
                                        <button class="btn blue fileBrowse" data-target="logo_hsth" type="button">Browse File</button>
										<button class="btn red fileDelete" data-target="logo_hsth" type="button">Delete File</button>
                                    </div>
                                </div>
        					</div>
                            
                            <div class="form-group">
        						<label class="control-label col-md-3">Banner (830x95)</label>
        						<div class="col-md-4">
                                    <div class="btn-group btn-group-xs btn-group-solid">
                                        <?php
                                            $image = @$setting['image']['banner_website'];
                                            $image = $image == "" ? "images/no-image.jpg" : $image; 
                                        ?>
                                        <img id="banner_website" class="show_image_browse" src="<?php echo $this->webroot ?><?php echo $image ?>" />
                                        <input class="banner_website" type="hidden" name="image[banner_website]" value="<?php echo $this->webroot ?><?php echo $image ?>" />
                                        <div class="clear"></div>
                                        <button class="btn blue fileBrowse" data-target="banner_website" type="button">Browse File</button>
										<button class="btn red fileDelete" data-target="banner_website" type="button">Delete File</button>
                                    </div>
                                </div>
        					</div>
                            
                            <div class="form-group">
        						<label class="control-label col-md-3">Logo footer (70x50)</label>
        						<div class="col-md-4">
                                    <div class="btn-group btn-group-xs btn-group-solid">
                                        <?php
                                            $image = @$setting['image']['logo_footer'];
                                            $image = $image == "" ? "images/no-image.jpg" : $image; 
                                        ?>
                                        <img id="logo_footer" class="show_image_browse" src="<?php echo $this->webroot ?><?php echo $image ?>" />
                                        <input class="logo_footer" type="hidden" name="image[logo_footer]" value="<?php echo $this->webroot ?><?php echo $image ?>" />
                                        <div class="clear"></div>
                                        <button class="btn blue fileBrowse" data-target="logo_footer" type="button">Browse File</button>
										<button class="btn red fileDelete" data-target="logo_footer" type="button">Delete File</button>
                                    </div>
                                </div>
        					</div>
                            
                            <div class="form-group">
        						<label class="control-label col-md-3">Favicon (20x20)</label>
        						<div class="col-md-4">
                                    <div class="btn-group btn-group-xs btn-group-solid">
                                        <?php
                                            $image = @$setting['image']['favicon'];
                                            $image = $image == "" ? "images/no-image.jpg" : $image; 
                                        ?>
                                        <img id="favicon" class="show_image_browse" src="<?php echo $this->webroot ?><?php echo $image ?>" />
                                        <input class="favicon" type="hidden" name="image[favicon]" value="<?php echo $this->webroot ?><?php echo $image ?>" />
                                        <div class="clear"></div>
                                        <button class="btn blue fileBrowse" data-target="favicon" type="button">Browse File</button>
										<button class="btn red fileDelete" data-target="favicon" type="button">Delete File</button>
                                    </div>
                                </div>
        					</div>
                            
                            <div class="form-group">
        						<label class="control-label col-md-3">Facebook</label>
        						<div class="col-md-9">
                                    <?php
                                        echo $this->Form->input('social.social_facebook',
                                                        array(
                                                            'label' => false,
                                                            'div' => false,
                                                            'class' => 'form-control',
                                                            'value' => @$setting['social']['social_facebook']
                                                        )
                                        );
                                    ?>
                                </div>
        					</div>
                            <div class="form-group">
        						<label class="control-label col-md-3">Linkedin</label>
        						<div class="col-md-9">
                                    <?php
                                        echo $this->Form->input('social.social_linkedin]',
                                                        array(
                                                            'label' => false,
                                                            'div' => false,
                                                            'class' => 'form-control',
                                                            'value' => @$setting['social']['social_linkedin']
                                                        )
                                        );
                                    ?>
                                </div>
        					</div>
                            <div class="form-group">
        						<label class="control-label col-md-3">Twitter</label>
        						<div class="col-md-9">
                                    <?php
                                        echo $this->Form->input('social.social_twitter',
                                                        array(
                                                            'label' => false,
                                                            'div' => false,
                                                            'class' => 'form-control',
                                                            'value' => @$setting['social']['social_twitter']
                                                        )
                                        );
                                    ?>
                                </div>
        					</div>
                            <div class="form-group">
        						<label class="control-label col-md-3">Google plus</label>
        						<div class="col-md-9">
                                    <?php
                                        echo $this->Form->input('social.social_google',
                                                        array(
                                                            'label' => false,
                                                            'div' => false,
                                                            'class' => 'form-control',
                                                            'value' => @$setting['social']['social_google']
                                                        )
                                        );
                                    ?>
                                </div>
        					</div>
                            <div class="form-group">
        						<label class="control-label col-md-3">Youtube</label>
        						<div class="col-md-9">
                                    <?php
                                        echo $this->Form->input('social.youtube',
                                                        array(
                                                            'label' => false,
                                                            'div' => false,
                                                            'class' => 'form-control',
                                                            'value' => @$setting['social']['youtube']
                                                        )
                                        );
                                    ?>
                                </div>
        					</div>
                            
                            <div class="form-group">
        						<label class="control-label col-md-3">Currency</label>
        						<div class="col-md-9">
                                    <?php
                                        echo $this->Form->input('config.currency',
                                                        array(
                                                            'label' => false,
                                                            'div' => false,
                                                            'class' => 'form-control',
                                                            'value' => @$setting['config']['currency']
                                                        )
                                        );
                                    ?>
                                </div>
        					</div>
                            
                            <div class="form-group">
        						<label class="control-label col-md-3">Hotline</label>
        						<div class="col-md-9">
                                    <?php
                                        echo $this->Form->input('config.hotline',
                                                        array(
                                                            'label' => false,
                                                            'div' => false,
                                                            'class' => 'form-control',
                                                            'value' => @$setting['config']['hotline']
                                                        )
                                        );
                                    ?>
                                </div>
        					</div>
                            <div class="form-group">
        						<label class="control-label col-md-3">Hỗ trợ yahoo</label>
        						<div class="col-md-9">
                                    <?php
                                        echo $this->Form->input('config.support_yahoo',
                                                        array(
                                                            'label' => false,
                                                            'div' => false,
                                                            'class' => 'form-control',
                                                            'value' => @$setting['config']['support_yahoo']
                                                        )
                                        );
                                    ?>
                                </div>
        					</div>
                            <div class="form-group">
        						<label class="control-label col-md-3">Hỗ trợ skype</label>
        						<div class="col-md-9">
                                    <?php
                                        echo $this->Form->input('config.support_skype',
                                                        array(
                                                            'label' => false,
                                                            'div' => false,
                                                            'class' => 'form-control',
                                                            'value' => @$setting['config']['support_skype']
                                                        )
                                        );
                                    ?>
                                </div>
        					</div>
                            
                            <div class="form-group">
        						<label class="control-label col-md-3">Email</label>
        						<div class="col-md-9">
                                    <?php
                                        echo $this->Form->input('config.email_send_request',
                                                        array(
                                                            'label' => false,
                                                            'div' => false,
                                                            'class' => 'form-control',
                                                            'value' => @$setting['config']['email_send_request']
                                                        )
                                        );
                                    ?>
                                </div>
        					</div>
                            
                            <div class="form-group">
        						<label class="control-label col-md-3"></label>
        						<div class="col-md-9">
                        			<div class="tabbable tabbable-custom">
                        				<ul class="nav nav-tabs">
                                            <?php
                                                $i=0;
                                                foreach($list_language as $language)
                                                {
                                                    $language = $language['language'];
                                                    $lang_code = $language['lang_code'];
                                            ?>
                        					<li class='<?php echo $i++==0 ? "active" : "" ?>'>
                        						<a data-toggle="tab" href="#tab_<?php echo $lang_code ?>">
                        							 <img src="<?php echo $this->webroot; ?>admin/img/flags/<?php echo $lang_code ?>.png" />
                                                     <?php echo $language['title'] ?>
                        						</a>
                        					</li>
                                            <?php
                                                }
                                            ?>
                        				</ul>
                        				<div class="tab-content">
                                            <?php
                                                $i = 0;
                                                foreach($list_language as $language)
                                                {
                                                    $language = $language['language'];
                                                    $lang_code = $language['lang_code'];
                                            ?>
                                            <div id="tab_<?php echo $lang_code ?>" class="tab-pane <?php echo $i++==0 ? "active" : "" ?>">
                                                <div class="form-group">
                            						<label class="control-label mgl15">Title website</label>
                            						<div class="col-md-12">
                            							<input type="text" name="config[title_website][<?php echo $lang_code ?>]" class="form-control" value="<?php echo @$setting['config']['title_website'][$lang_code]?>"/>
                            						</div>
                            					</div>
                                                <!--END_INPUT_FORM-->
                                                <div class="form-group">
                            						<label class="control-label mgl15">
                                                        Meta title default
                                                    </label>
                            						<div class="col-md-12">
                            							<input type="text" name="config[meta_title_default][<?php echo $lang_code ?>]" class="form-control" value="<?php echo @$setting['config']['meta_title_default'][$lang_code]?>"/>
                            						</div>
                            					</div>
                                                <!--END_INPUT_FORM-->
                                                <div class="form-group">
                                                    <label class="control-label mgl15">
                                                        Meta description default
                            						</label>
                            						<div class="col-md-12">
                            							<textarea name="config[meta_description_default][<?php echo $lang_code ?>]" class="form-control"><?php echo @$setting['config']['meta_description_default'][$lang_code]?></textarea>
                            						</div>
                                                </div>
                                                <!--END_INPUT_FORM-->
                                                <div class="form-group">
                                                    <label class="control-label mgl15">
                                                        Meta keywords default
                            						</label>
                            						<div class="col-md-12">
                            							<textarea name="config[meta_keywords_default][<?php echo $lang_code ?>]" class="form-control"><?php echo @$setting['config']['meta_keywords_default'][$lang_code]?></textarea>
                            						</div>
                                                </div>
                                                <!--END_INPUT_FORM-->
                                                <div class="clearfix"></div>
                        					</div>
                        					<!--end tab-pane-->
                                            <?php
                                                }
                                            ?>
                        					<!--end tab-pane-->
                                            <div class="clearfix"></div>
                        				</div>
                                        
                        			</div>
                        		</div>
        					</div>
                            <div class="clearfix"></div>
        				</div>
        				<div class="form-actions fluid">
        					<div class="col-md-offset-3 col-md-9">
                                <button type="submit" class="btn blue" name="btn_submit" value="ok">Submit</button>
        						<button type="button" class="btn default" onclick="window.location.href='<?php echo $this->Admin->admin_url() ?>setting/index'">Cancel</button>
        					</div>
        				</div>
                        
        			<?php echo $this->Form->end(); ?>
        			<!-- END FORM-->
        		</div>
        		<!-- END VALIDATION STATES-->
        	</div>
        </div>
    </div>
</div>                 
<!-- END CONTENT -->
<script type="text/javascript" src="<?php echo $this->webroot; ?>ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="<?php echo $this->webroot; ?>ckfinder/ckfinder.js"></script>

